package com.chat.webSocketUtils;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.config.annotation.EnableWebSocket;
import org.springframework.web.socket.config.annotation.WebSocketConfigurer;
import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry;

/*@Configuration
@EnableWebSocket*///开启websocket
public class WebSocketConfig /*implements WebSocketConfigurer*/{

/*	@Autowired
	WebsocketEndPointHandler handler;
	
	@Override
	public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
		// TODO Auto-generated method stub
		registry.addHandler(handler,"/webSocket").addInterceptors(new HandshakeInterceptor()); //支持websocket 的访问链接
        registry.addHandler(handler,"/sockjs/echo").addInterceptors(new HandshakeInterceptor()).withSockJS(); //不支持websocket的访问链接
	}*/

}
